home *** CD-ROM | disk | FTP | other *** search
- _level0.env = new Object();
- _level0.env.ch = new Object();
- _level0.env.ch.colour = {n_dark_ra:39,n_dark_ga:41,n_dark_ba:63,n_dark_aa:100,n_light_ra:51,n_light_ga:55,n_light_ba:77,n_light_aa:100,n_text_ra:100,n_text_ga:100,n_text_ba:100,n_text_aa:100,o_dark_ra:16,o_dark_ga:18,o_dark_ba:41,o_dark_aa:100,o_light_ra:19,o_light_ga:20,o_light_ba:41,o_light_aa:100,o_text_ra:100,o_text_ga:100,o_text_ba:100,o_text_aa:100,p_dark_ra:19,p_dark_ga:20,p_dark_ba:41,p_dark_aa:100,p_light_ra:19,p_light_ga:20,p_light_ba:41,p_light_aa:100,p_text_ra:100,p_text_ga:100,p_text_ba:100,p_text_aa:100};
- _level0.colour = function(me)
- {
- if(_level0.colourSet != true)
- {
- _level0.setChannelColour();
- _level0.colourSet = true;
- }
- this.state = new Object();
- this.state.clear = _level0.env.ch.clear;
- this.state.none = _level0.env.ch.none;
- this.state.normal = _level0.env.ch.normal;
- this.state.over = _level0.env.ch.over;
- this.state.pressed = _level0.env.ch.pressed;
- this.dInst = new Color(me.dark);
- this.lInst = new Color(me.light);
- this.tInst = new Color(me.text);
- this.setState = colourObj_setState;
- this.none = function()
- {
- this.setState("none");
- };
- this.normal = function()
- {
- this.setState("normal");
- };
- this.rollover = function()
- {
- this.setState("over");
- };
- this.pressed = function()
- {
- this.setState("pressed");
- };
- this.clear = function()
- {
- this.setState("clear");
- };
- this.init = colourObj_init;
- this.refresh = colourObj_refresh;
- this.init();
- _level0.colourObjStack.push(me);
- };
- _level0.colourObj_setState = function(which)
- {
- this.dInst.setTransform(this.state[which].dark);
- this.lInst.setTransform(this.state[which].light);
- this.tInst.setTransform(this.state[which].text);
- this.currentState = which;
- };
- _level0.colourObj_init = function()
- {
- this.normal();
- };
- _level0.colourObj_refresh = function()
- {
- this.state.normal = _level0.env.ch.normal;
- this.state.over = _level0.env.ch.over;
- this.state.pressed = _level0.env.ch.pressed;
- this.state.clear = _level0.env.ch.clear;
- this.setState(this.currentState);
- };
- _level0.setChannelColour = function()
- {
- if(_level0.env != null && _level0.env.ch != null)
- {
- var tempObjRef = _level0.env.ch;
- var states = ["normal","over","pressed"];
- var colObjects = ["dark","light","text"];
- var setTrans = ["ra","rb","ga","gb","ba","bb","aa","ab"];
- tempObjRef.none = new Object();
- tempObjRef.none.dark = {ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0};
- tempObjRef.none.light = {ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0};
- tempObjRef.none.text = {ra:100,rb:0,ga:100,gb:0,ba:100,bb:0,aa:100,ab:0};
- tempObjRef.clear = new Object();
- tempObjRef.clear.dark = {ra:0,rb:0,ga:0,gb:0,ba:0,bb:0,aa:0,ab:0};
- tempObjRef.clear.light = {ra:0,rb:0,ga:0,gb:0,ba:0,bb:0,aa:0,ab:0};
- tempObjRef.clear.text = {ra:0,rb:0,ga:0,gb:0,ba:0,bb:0,aa:0,ab:0};
- i = 0;
- while(i < states.length)
- {
- tempObjRef[states[i]] = new Object();
- var stateObj = tempObjRef[states[i]];
- c = 0;
- while(c < colObjects.length)
- {
- stateChar1 = states[i].charAt(0);
- stateObj[colObjects[c]] = new Object();
- t = 0;
- while(t < setTrans.length)
- {
- stateObj[colObjects[c]][setTrans[t]] = tempObjRef.colour[stateChar1 + "_" + colObjects[c] + "_" + setTrans[t]];
- t++;
- }
- c++;
- }
- i++;
- }
- if(_level0.colourObjStack == null)
- {
- _level0.colourObjStack = [];
- }
- else
- {
- for(i in "_level0:colourObjStack")
- {
- if(_level0.colourObjStack[i]._target == null)
- {
- _level0.colourObjStack.splice(i,1);
- }
- else
- {
- _level0.colourObjStack[i].colour.refresh();
- }
- }
- }
- }
- };
- stop();
-